#include <condition_variable>
#include <deque>
#include <iostream>
#include <mutex>
#include <thread>
class A {
private:
    std::mutex DataMutex;
    std::condition_variable Datacond;
    std::deque<int> DataQueue;

public:
    void Push(int a);
    int WaitPop();
};

void A::Push(int a)
{
    std::lock_guard<std::mutex> lg(DataMutex);
    DataQueue.push_back(a);
    Datacond.notify_one();
}

int A::WaitPop()
{
    std::unique_lock<std::mutex> lk(DataMutex);
    Datacond.wait(lk, [this]() -> bool { return !DataQueue.empty(); });
    int res = DataQueue.front();
    DataQueue.pop_front();
    return res;
}

int main()
{
	std::thread a;
	
}
